<?php
$txt="Hello World!";
$x=16;
echo $txt;
echo $x;
?>

<?php
$a = 5; // global scope

function myTest()
{
echo $a; // local scope
} 

myTest();
?>


<?php
$a = 5;
$b = 10;

function myTest1()
{
global $a, $b;
$b = $a + $b;
} 

myTest1();
echo $b;
?>

<?php
$a = 5;
$b = 10;

function myTest2()
{
$GLOBALS['b'] = $GLOBALS['a'] + $GLOBALS['b'];
} 

myTest2();
echo $b;
?>
